#include <iostream>
#include <signal.h>
#include <sys/resource.h>
#include <string>
#include <ctemplate/template.h>

int main()
{
    std::string in_html = "./test.html";
    std::string value = "大厂， 冲冲冲！！！";

    // 形成字典序
    ctemplate::TemplateDictionary root("test"); //unordered_map<> test;
    root.SetValue("key", value); 

    // 获取被渲染的网页
    ctemplate::Template *tp = ctemplate::Template::GetTemplate(in_html, ctemplate::DO_NOT_STRIP);

    // 将字典序添加到带被渲染的网页中
    std::string out_html;
    tp->Expand(&out_html, &root);
    std::cout << out_html << std::endl;
    return 0;
}